package top.jolyoulu.corecommon.utils.other;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;

/**
 * @Author: JolyouLu
 * @Date: 2023/12/17 1:17
 * @Description 日期工具类
 */
public class DateUtils {

    /**
     * LocalDateTime转换为Date
     * @param localDateTime
     * @return
     */
    public static Date localDateTimeToDate(LocalDateTime localDateTime){
        return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
    }

}
